package cn.endowment.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.dubbo.config.annotation.Reference;
import cn.endowment.clientserviceapi.IClientUserService;


/**
 * 前台用户Controller
 * @author Administrator
 *
 */
@RestController
public class ClientUserController {
	/**
	 * 用户服务接口
	 */
	@Reference
	private IClientUserService userService;
	/**
	 * 添加用户
	 * @param uname 用户名
	 * @param sex  性别
	 * @return 视图
	 */
	@RequestMapping("/user/add")
	public String add(String uname,String sex){
		Map<String,String> map=new HashMap<String,String>();
		map.put("name",uname);
		map.put("sex",sex);
		int result=userService.addUser(map);
		return result+"";
	}
}
